<script setup>
import { defineEmits } from 'vue'

const props = defineProps({
    title:String
})
const emit = defineEmits(['open'])

</script>

<template>
    <div class="pagecontainer">
        <div class="top">
            <h2 class="title"><span>拖动板块</span><span>{{ props.title }}</span></h2>
            <div @click="emit('open')" class="display">查看原图</div>
        </div>
        <div class="mainbody">
            <slot></slot>
        </div>
    </div>
</template>

<style lang="scss" scoped>
.pagecontainer{
    background-color: #F2F7FA;
    height: 100%;
    .top{
        position: relative;
        padding-top: 50px;
        user-select: none;
        overflow: hidden;
        .title{
            display: flex;
            flex-direction: column;
            align-items: center;
            position: absolute;
            left: 50%;
            transform: translate(-50%,0);
            font-size: 32px;
            line-height: 37px;
            color: #132241;
            font-weight: normal;
        }
        .display{
            margin-right: 80px;
            float: right;
            margin-top: 7px;
            width: 172px;
            height: 67px;
            border-radius: 66px;
            font-size: 24px;
            display: flex;
            justify-content: center;
            cursor: pointer;
            align-items: center;
            background: rgba(55, 118, 249, 0.1);
            color: #3776F9;
            transition: all .5s;
        }
        .display:hover{
            background: rgba(55, 118, 249, 0.2);
        }
    }
    .mainbody{
        margin: 40px auto 0;
        width: 1280px;
        height: 830px;
        border-radius: 40px;
        background-color: #fff;
    }
}
</style>
